import Main from '../views/main/main'
import Home from '../views/main/home/home'
import My from '../views/main/my/my'
import Rank from '../views/main/rank/rank'
import Classify from '../views/classify/classify'

export interface RouteItem{
    path:string,
    component?:any,
    redirect?:string,
    children?:RouteItem[]
}


let routes:RouteItem[] = [
    {
        path:'/main',
        component:Main,
        children:[
            {
                path:'/main/home',
                component:Home
            },
            {
                path:'/main/rank',
                component:Rank
            },
            {
                path:'/main/my',
                component:My
            },
            {
                path:'/main',
                redirect:'/main/home'
            }
        ]
    },
    {
        path:'/classify/:type',
        component:Classify
    }
    ,
    {
        path:'/',
        redirect:'/main'
    }
];

export default routes
